<template>
    <div>
        <el-row class="bg-top" style="display: none;">
            <el-col :span="24">
                <div class="system">
                    <div class="titleText">系统故障</div>
                    <div class="systemFailure">
                        <el-col :span="4" class="systemFailure-list2">
                            <div :class="sigComFaultAlarm==1?'dot1':sigComFaultAlarm==0?'dot':'dot0'"></div>
                            <span>上行信号系统网络通信故障</span>
                        </el-col>
						<el-col :span="4" class="systemFailure-list2">
						    <div :class="TIASStatus==1?'dot1':TIASStatus==0?'dot':'dot0'"></div>
						    <span>上行综合监控网络通讯故障</span>
						</el-col>
						<el-col :span="4" class="systemFailure-list2">
						     <div :class="upCANStatus==1?'dot1':upCANStatus==0?'dot':'dot0'"></div>
						    <span>上行第一路CAN通讯故障</span>
						</el-col>
                        
                        
                        
                        <!-- <el-col :span="4" class="systemFailure-list2">
                            <div class="dot"></div>
                            <span>CI硬线通讯故障</span>
                        </el-col> -->
                        <el-col :span="4" class="systemFailure-list2">
                            <div :class="downCANStatus==1?'dot1':downCANStatus==0?'dot':'dot0'"></div>
                            <span>下行第一路CAN通讯故障</span>
                        </el-col>
						<el-col :span="4" class="systemFailure-list2">
						    <div :class="safeInputFaultWarning==1?'dot1':safeInputFaultWarning==0?'dot':'dot0'"></div>
						    <span>上行安全输出故障报警</span>
						</el-col>
						<el-col :span="3" class="systemFailure-list2">
						    <div :class="upScdStatus==1?'dot1':upScdStatus==0?'dot':'dot0'"></div>
						    <span>上行双触点故障</span>
						</el-col>
						<!-- <el-col :span="3" class="systemFailure-list2">
						    <div :class="powerSupplyStatus==1?'dot1':powerSupplyStatus==0?'dot':'dot0'"></div>
						    <span>主电源故障</span>
						</el-col> -->
						
					
						<el-col :span="4" class="systemFailure-list2">
							<div :class="sigComFaultAlarmB==1?'dot1':sigComFaultAlarm==0?'dot':'dot0'"></div>
							<span>下行信号系统网络通信故障</span>
						</el-col>
						<el-col :span="4" class="systemFailure-list2">
						    <div :class="TIASStatus1==1?'dot1':TIASStatus1==0?'dot':'dot0'"></div>
						    <span>下行综合监控网络通讯故障</span>
						</el-col>
						<el-col :span="4" class="systemFailure-list2">
						    <div :class="upCANStatus1==1?'dot1':upCANStatus1==0?'dot':'dot0'"></div>
						    <span>上行第二路CAN通讯故障</span>
						</el-col>
                        <el-col :span="4" class="systemFailure-list2">
                            <div :class="downCANStatus1==1?'dot1':downCANStatus1==0?'dot':'dot0'"></div>
                            <span>下行第二路CAN通讯故障</span>
                        </el-col>
						
						<el-col :span="4" class="systemFailure-list2">
						    <div :class="safeInputFaultWarning1==1?'dot1':safeInputFaultWarning1==0?'dot':'dot0'"></div>
						    <span>下行安全输出故障报警</span>
						</el-col>
                        <el-col :span="3" class="systemFailure-list2">
                            <div :class="downScdStatus==1?'dot1':downScdStatus==0?'dot':'dot0'"></div>
                            <span>下行双触点故障</span>
                        </el-col>
                        


                        <!-- <div class="systemFailure-list">
                            <div class="dot"></div>
                            <span>ATS网络通讯故障</span>
                        </div>
                        <div class="systemFailure-list">
                            <div class="dot"></div>
                            <span>上行第二路CAN通讯故障</span>
                        </div>
                        <div class="systemFailure-list">
                            <div class="dot"></div>
                            <span>下行第一路CAN通讯故障</span>
                        </div>
                        <div class="systemFailure-list">
                            <div class="dot"></div>
                            <span>综合监控网络通讯故障</span>
                        </div>
                        <div class="systemFailure-list">
                            <div class="dot"></div>
                            <span>CI硬线通讯故障</span>
                        </div>
                        <div class="systemFailure-list">
                            <div class="dot"></div>
                            <span>上行第一路CAN通讯故障</span>
                        </div>
                        <div class="systemFailure-list">
                            <div class="dot"></div>
                            <span>下行第二路CAN通讯故障</span>
                        </div> -->
                    </div>
                </div>
            </el-col>
        </el-row>
        <el-row class="bg-middle">
            <div class="upstreamTitleText">上行继电器</div>
            <div class="relayBox">
                <el-col class="relay-list">
                    <div class="relayListContent">
                        <p>信号系统6B开门</p>
						<div class="relay-dis">
							<div class="relayListContent-Box1" :class="openStatus4A==1?'boxColor1':''">吸起</div>
							<div class="relayListContent-Box1" :class="openStatus4A==0?'boxColor1':''">落下</div>
						</div>
                       
                        <div class="relayListContent-Box2">{{sigUp4AOpenCmdVoltage}}V</div>
                    </div>
                </el-col>
                <el-col  class="relay-list">
                    <div class="relayListContent">
                        <p>信号系统8B开门</p>
                       <div class="relay-dis">
                       	<div class="relayListContent-Box1" :class="openStatus8A==1?'boxColor1':''">吸起</div>
                       	<div class="relayListContent-Box1" :class="openStatus8A==0?'boxColor1':''">落下</div>
                       </div>
                        <div class="relayListContent-Box2">{{sigUp8AOpenCmdVoltage}}V</div>
                    </div>
                </el-col>
                <el-col  class="relay-list">
                    <div class="relayListContent">
                        <p>信号系统关门</p>
                        <div class="relay-dis">
                        	<div class="relayListContent-Box1" :class="closeStatus==1?'boxColor1':''">吸起</div>
                        	<div class="relayListContent-Box1" :class="closeStatus==0?'boxColor1':''">落下</div>
                        </div>
                        <div class="relayListContent-Box2">{{sigUpCloseCmdVoltage}}V</div>
                    </div>
                </el-col>
                <el-col class="relay-list">
                    <div class="relayListContent">
                        <p>门关闭且锁紧</p>
                        <div class="relay-dis">
                        	<div class="relayListContent-Box1" :class="closeLockStatus==1?'boxColor1':''">入口</div>
                        	<div class="relayListContent-Box1" :class="closeLockStatus==0?'boxColor1':''">出口</div>
                        </div>
                        <div class="relayListContent-Box2 relayListContent-Box21">
							<span style="width: 6.8vw">{{sigUpCalInputVoltage}}V</span>
							<span style="width: 1px; height: 100%;display: block;background-color: black;"></span>
						    <span style="width: 6.9vw;">{{sigUpCalOutputVoltage}}V</span>
						</div>
                    </div>
                </el-col>
                <el-col  class="relay-list">
                    <div class="relayListContent">
                        <p>互锁解除</p>
                        <div class="relay-dis">
                        	<div class="relayListContent-Box1" :class="interLockStatus==1?'boxColor1':''">吸起</div>
                        	<div class="relayListContent-Box1" :class="interLockStatus==0?'boxColor1':''">落下</div>
                        </div>
                        <div class="relayListContent-Box2 relayListContent-Box21">
							<span style="width: 6.8vw">{{sigUpIrInputVoltage}}V</span>
							<span style="width: 1px; height: 100%;display: block;background-color: black;"></span>
							<span style="width: 6.9vw;">{{sigUpIrOutputVoltage}}V</span>
						</div>
                    </div>
                </el-col>
                 <el-col  class="relay-list">
                    <div class="relayListContent">
                        <p>安全回路输入电压</p>
                        <!-- <div class="relay-dis">
                        	<div class="relayListContent-Box1" :class="sigUpinputVoltageStatus==0?'boxColor1':''">断开</div>
                        	<div class="relayListContent-Box1" :class="sigUpinputVoltageStatus==1?'boxColor1':''">闭合</div>
                        </div> -->
                        <div class="relayListContent-Box2" style="height: 76px;line-height: 76px;">{{sigUploopOutputVoltage}}V</div>
                    </div>
                </el-col>
                <el-col  class="relay-list">
                    <div class="relayListContent">
                        <p>安全回路输出电压</p>
                       <!-- <div class="relay-dis">
                        	<div class="relayListContent-Box1" :class="sigUpoutputVoltageStatus==0?'boxColor1':''">断开</div>
                        	<div class="relayListContent-Box1" :class="sigUpoutputVoltageStatus==1?'boxColor1':''">闭合</div>
                        </div> -->
                        <div class="relayListContent-Box2" style="height: 76px;line-height: 76px;">{{sigUploopInputVoltage}}V</div>
                    </div>
                </el-col>
            </div>
        </el-row>
        <el-row class="bg-bottom">
            <div class="upstreamTitleText">下行继电器</div>
            <div class="relayBox">
                <el-col  class="relay-list">
                    <div class="relayListContent">
                        <p>信号系统6B开门</p>
                       <div class="relay-dis">
                        	<div class="relayListContent-Box1" :class="openStatus4A1==1?'boxColor1':''">吸起</div>
                        	<div class="relayListContent-Box1" :class="openStatus4A1==0?'boxColor1':''">落下</div>
                        </div>
                        <div class="relayListContent-Box2">{{sigDown4AOpenCmdVoltage}}V</div>
                    </div>
                </el-col>
                <el-col  class="relay-list">
                    <div class="relayListContent">
                        <p>信号系统8B开门</p>
                        <div class="relay-dis">
                        	<div class="relayListContent-Box1" :class="openStatus8A1==1?'boxColor1':''">吸起</div>
                        	<div class="relayListContent-Box1" :class="openStatus8A1==0?'boxColor1':''">落下</div>
                        </div>
                        <div class="relayListContent-Box2">{{sigDown8AOpenCmdVoltage}}V</div>
                    </div>
                </el-col>
                <el-col  class="relay-list">
                    <div class="relayListContent">
                        <p>信号系统关门</p>
                        <div class="relay-dis">
                        	<div class="relayListContent-Box1" :class="closeStatus1==1?'boxColor1':''">吸起</div>
                        	<div class="relayListContent-Box1" :class="closeStatus1==0?'boxColor1':''">落下</div>
                        </div>
                        <div class="relayListContent-Box2">{{sigDownCloseCmdVoltage}}V</div>
                    </div>
                </el-col>
                <el-col class="relay-list">
                    <div class="relayListContent">
                        <p>门关闭且锁紧</p>
                        <div class="relay-dis">
                        	<div class="relayListContent-Box1" :class="closeLockStatus1==1?'boxColor1':''">入口</div>
                        	<div class="relayListContent-Box1" :class="closeLockStatus1==0?'boxColor1':''">出口</div>
                        </div>
                        <div class="relayListContent-Box2 relayListContent-Box21">
							<span style="width: 6.8vw">{{sigDownCalInputVoltage}}V</span>
							<span style="width: 1px; height: 100%;display: block;background-color: black;"></span>
							<span style="width: 6.9vw;">{{sigDownCallOuputVoltage}}V</span>
						</div>
                    </div>
                </el-col>
                <el-col  class="relay-list">
                    <div class="relayListContent">
                        <p>互锁解除</p>
                        <div class="relay-dis">
                        	<div class="relayListContent-Box1"  :class="interLockStatus1==1?'boxColor1':''">吸起</div>
                        	<div class="relayListContent-Box1"  :class="interLockStatus1==0?'boxColor1':''">落下</div>
                        </div>
                        <div class="relayListContent-Box2 relayListContent-Box21">
							<span style="width: 6.8vw">{{sigDownIrInputVoltage}}V</span>
							<span style="width: 1px; height: 100%;display: block;background-color: black;"></span>
							<span style="width: 6.9vw;">{{sigDownIrOutputVoltage}}V</span>
						</div>
                    </div>
                </el-col>
                <el-col  class="relay-list">
                    <div class="relayListContent">
                        <p>安全回路输入电压</p>
                       <!-- <div class="relay-dis">
                        	<div class="relayListContent-Box1" :class="sigDowninputVoltageStatus==0?'boxColor1':''">断开</div>
                        	<div class="relayListContent-Box1" :class="sigDowninputVoltageStatus==1?'boxColor1':''">闭合</div>
                        </div> -->
                        <div class="relayListContent-Box2" style="height: 76px;line-height: 76px;">{{sigDownloopOutputVoltage}}V</div>
                    </div>
                </el-col>
                <el-col  class="relay-list">
                    <div class="relayListContent">
                        <p>安全回路输出电压</p>
                        <!-- <div class="relay-dis">
                        	<div class="relayListContent-Box1" :class="sigDownoutputVoltageStatus==0?'boxColor1':''">断开</div>
                        	<div class="relayListContent-Box1" :class="sigDownoutputVoltageStatus==1?'boxColor1':''">闭合</div>
                        </div> -->
                        <div class="relayListContent-Box2" style="height: 76px;line-height: 76px;">{{sigDownloopInputVoltage}}V</div>
                    </div>
                </el-col>
            </div>
        </el-row>
		<div class="tipContent" v-if="tipStatus">
				  <div class="tipsTxt">
					  <div class="merquee">
					  	<span class="merquee-txt">{{msg}}</span>
					  </div>
					  <!-- <marquee :val="msg"></marquee> -->
				    </div>
		</div>
		<el-row class="bg2 bg4">
			<el-col :span="24">
				<h3 class="baseHeader baseHeader1" style="margin: 0;">
					测试转换钥匙状态
					<el-switch class="baseS" v-model="ceshiValue" active-color="rgba(0, 82, 217, 1)"
						inactive-color="rgba(0, 0, 0, 0.26)" disabled>
					</el-switch>
				</h3>
			</el-col>
		</el-row>
		<el-row class="bg1" style="height: auto">
			<el-col :span="24">
				<h3 class="baseHeader" style="text-align: left">开关门测试</h3>
				<div class="baseInfo" style="height: auto; align-items: flex-start">
					<el-form :inline="true" :rules="dataRule" ref="dataForm" :model="dataForm">
						<el-form-item label="站台侧" prop="slide">
							<el-select v-model="dataForm.slide" filterable clearable placeholder="请选择站台侧">
								<el-option v-for="item in stationOptions" :key="item.value" :label="item.label"
									:value="item.value"></el-option>
							</el-select>
						</el-form-item>
						<!-- <el-form-item label="PEDC" prop="pedc">
							<el-select v-model="dataForm.pedc" filterable clearable placeholder="请选择pedc"
								@change="changeStation">
								<el-option v-for="item in pedcOptions" :key="item.value" :label="item.label"
									:value="item.value"></el-option>
							</el-select>
						</el-form-item> -->
						<el-button class="btn1" :disabled="!ceshiValue" type="danger" @click="closeDoor(0)">关门
						</el-button>
						<el-button class="btn1" :disabled="!ceshiValue" type="success" @click="closeDoor(1)">开6B门
						</el-button>
						<el-button class="btn1" :disabled="!ceshiValue" type="success" @click="closeDoor(2)">开8B门
						</el-button>
					</el-form>
				</div>
			</el-col>
		</el-row>
    </div>
</template>

<script>
export default {
	 inject: ["reload"],
    data () {
        return {
		   tipStatus:false,
		   msg:'',
           openStatus4A:-1,
		   openStatus8A:-1,
		   closeStatus:-1,
		   closeLockStatus:-1,
		   interLockStatus:-1,
		   openStatus4A1:-1,
		   openStatus8A1:-1,
		   closeStatus1:-1,
		   closeLockStatus1:-1,
		   interLockStatus1:-1,
		   TIASStatus:-1,
		   TIASStatus1:-1,
           powerSupplyStatus:-1,//主电源故障
		   upScdStatus:-1,//上行双触点故障
		   downScdStatus:-1,//下行双触点故障
           sigUpinputVoltageStatus:-1,
           sigUpoutputVoltageStatus:-1,
           sigDowninputVoltageStatus:-1,
           sigDownoutputVoltageStatus:-1,
		   upCANStatus:-1,//现场总线1故障报警
		   upCANStatus1:-1,//现场总线2故障报警
		   downCANStatus:-1,//现场总线1故障报警--下行
		   downCANStatus1:-1,//现场总线1故障报警--下行
		   safeInputFaultWarning:-1,//上行安全输出故障报警
		   safeInputFaultWarning1:-1,//下行安全输出故障报警
		   taskStatus:-1,
		   sigComFaultAlarm:-1,
		   sigComFaultAlarmB:-1,
		   sigUp4AOpenCmdVoltage:'0.0',//信号系统4A开门
		   sigUp8AOpenCmdVoltage:'0.0',//信号系统8A开门
		   sigUpCloseCmdVoltage:'0.0',//门关闭且锁紧
		   sigDown4AOpenCmdVoltage:'0.0',//信号系统4A开门
		   sigDown8AOpenCmdVoltage:'0.0',//信号系统8A开门
		   sigDownCloseCmdVoltage:'0.0',//信号系统关门
		   sigUpCalInputVoltage:'0.0',//门关闭且锁紧
		   sigUpCalOutputVoltage:'0.0',//门关闭且锁紧
		   sigUpIrInputVoltage:'0.0',//互锁解除
		   sigUpIrOutputVoltage:'0.0',//互锁解除
		   sigDownCalInputVoltage:'0.0',//门关闭且锁紧
		   sigDownCallOuputVoltage:'0.0',//门关闭且锁紧
		   sigDownIrInputVoltage:'0.0',//互锁解除
		   sigDownIrOutputVoltage:'0.0',//互锁解除
           sigUploopInputVoltage:'0.0',//上行安全回路输入电压
           sigUploopOutputVoltage:'0.0',//上行安全回路输出电压
           sigDownloopInputVoltage:'0.0',//下行安全回路输入电压
           sigDownloopOutputVoltage:'0.0',//下行安全回路输出电压
		   ceshiValue: false,
		   dataForm: {
		   	slide: "",
		   	ops: "",
		   },
		   stationOptions: [{
		   		value: 0,
		   		label: "上行",
		   	},
		   	{
		   		value: 1,
		   		label: "下行",
		   	},
		   	{
		   		value: 2,
		   		label: "上下行",
		   	},
		   ], //上下行
        }
    },
	computed: {
		dataRule() {
			return {
				slide: [{
					required: true,
					message: "站台侧不为空",
					trigger: "blur"
				}],
				// pedc: [{
				// 	required: true,
				// 	message: "pedc不为空",
				// 	trigger: "blur",
				// }, ],
			};
		}
	},
	mounted (){
		window.addEventListener('onmessageWS', this.getSocketData)
	},
	destroyed() {
		window.removeEventListener('onmessageWS',this.getSocketData)
	},
	activated() {
		this.init()
	},
	beforeDestroy() {
		window.clearTimeout()
	},
    methods: {
		//关门
		closeDoor(id) {
			this.$refs["dataForm"].validate((valid) => {
				if (!valid) {
					return false;
				}
				var obj = {
					...this.dataForm,
					ops: id,
				};
				// console.log(obj, '开关门测试')
				this.$http.post("/psc/cmd/openCloseDoor", obj).then((res) => {
					if (res.data.code !== 0) {
						return this.$message.error(res.data.msg);
					}
					this.$message({
						message: this.$t("prompt.success"),
						type: "success",
						duration: 500,
						onClose: () => {},
					});
				});
			});
		},
		getSocketData(res){
			if (res.detail.data){
				this.init()
			}
		},
		init() {
			this.$nextTick(()=>{
				this.handleMsg()
			})
			
		},
	    //接收websocket数据
	    handleMsg() {
			setTimeout(()=>{
				this.$globalWebSocket.ws.send("psc");
				this.$globalWebSocket.ws.onmessage = this.getMessage
			},200)
	    },
		//获取websocket数据
		getMessage(e) {
			var message = JSON.parse(e.data)
			if(message.taskStatus==3){
				this.taskStatus = 3
				//都断开A B 同时宕机
				this.tipStatus =true
				this.msg = 'PEDC命令断开,正在重新连接'
				// Cookies.set('taskStatus',message.taskStatus)
			}else{
				this.taskStatus = 0
				//正常的
				this.tipStatus = false
			}
			this.TIASStatus= message.upLink.sysPscCenterControlPanel.tiasNetFault  //A系TIAS网络通讯故障
			this.TIASStatus1 = message.downLink.sysPscCenterControlPanel.tiasNetFault //B系TIAS网络通讯故障
			this.sigComFaultAlarm = message.upLink.sysPscCenterControlPanel.sigComFaultAlarm //A系信号系统网络通信
			this.sigComFaultAlarmB = message.downLink.sysPscCenterControlPanel.sigComFaultAlarm //B系信号系统网络通信
			this.upCANStatus = message.upLink.sysPscCenterControlPanel.bus1FaultAlarm //上行第一路CAN通讯故障
			this.upCANStatus1 = message.upLink.sysPscCenterControlPanel.bus2FaultAlarm//上行第二路CAN通讯故障
			this.downCANStatus = message.downLink.sysPscCenterControlPanel.bus1FaultAlarm //下行第一路CAN通讯故障
			this.downCANStatus1 = message.downLink.sysPscCenterControlPanel.bus2FaultAlarm//下行第二路CAN通讯故障
			this.safeInputFaultWarning = message.upLink.sysPscCenterControlPanel.safeInputFaultWarning  // 上行安全输出故障报警
			this.safeInputFaultWarning1 = message.downLink.sysPscCenterControlPanel.safeInputFaultWarning  // 下行安全输出故障报警
			this.upScdStatus = message.upLink.sysPscCenterControlPanel.doubleContactFaultWarning //上行双触点
			this.downScdStatus = message.downLink.sysPscCenterControlPanel.doubleContactFaultWarning //下行双触点
			// 上行继电器
			this.openStatus4A =  message.upLink.sysSigSystem.sig4AOpenDoorCmd //4A开门命令
			this.openStatus8A =  message.upLink.sysSigSystem.sig8AOpenDoorCmd //8A开门命令
			this.closeStatus = message.upLink.sysSigSystem.sigCloseDoorCmd //关门命令
			this.closeLockStatus =message.upLink.sysSigSystem.sigCloseAndLocked //关闭且锁紧 
			this.interLockStatus =message.upLink.sysSigSystem.sigInterLockRelease //互锁解除 
			// 下行继电器
			this.openStatus4A1 = message.downLink.sysSigSystem.sig4AOpenDoorCmd //4A开门命令
			this.openStatus8A1 =  message.downLink.sysSigSystem.sig8AOpenDoorCmd //8A开门命令
			this.closeStatus1 = message.downLink.sysSigSystem.sigCloseDoorCmd //关门命令
			this.closeLockStatus1 = message.downLink.sysSigSystem.sigCloseAndLocked //关闭且锁紧
			this.interLockStatus1 = message.downLink.sysSigSystem.sigInterLockRelease//互锁解除
			
			this.sigUp4AOpenCmdVoltage = Number(message.pscPower.sigUp4AOpenCmdVoltage).toFixed(1)
			this.sigUp8AOpenCmdVoltage = Number(message.pscPower.sigUp8AOpenCmdVoltage).toFixed(1)
			this.sigUpCloseCmdVoltage = Number(message.pscPower.sigUpCloseCmdVoltage).toFixed(1)
			this.sigDown4AOpenCmdVoltage = Number(message.pscPower.sigDown4AOpenCmdVoltage).toFixed(1)
			this.sigDown8AOpenCmdVoltage =  Number(message.pscPower.sigDown8AOpenCmdVoltage).toFixed(1)
			this.sigDownCloseCmdVoltage = Number(message.pscPower.sigDownCloseCmdVoltage).toFixed(1)
			this.sigUpCalInputVoltage =  Number(message.pscPower.sigUpCalInputVoltage).toFixed(1)//门关闭且锁紧
			this.sigUpCalOutputVoltage =  Number(message.pscPower.sigUpCalOutputVoltage).toFixed(1)//门关闭且锁紧
			this.sigUpIrInputVoltage =  Number(message.pscPower.sigUpIrInputVoltage).toFixed(1)//互锁解除
			this.sigUpIrOutputVoltage =  Number(message.pscPower.sigUpIrOutputVoltage).toFixed(1)//互锁解除
			this.sigDownCalInputVoltage = Number(message.pscPower.sigDownCalInputVoltage).toFixed(1)//门关闭且锁紧
			this.sigDownCallOuputVoltage = Number(message.pscPower.sigDownCallOuputVoltage).toFixed(1)//门关闭且锁紧
			this.sigDownIrInputVoltage = Number(message.pscPower.sigDownIrInputVoltage).toFixed(1)//互锁解除
			this.sigDownIrOutputVoltage = Number(message.pscPower.sigDownIrOutputVoltage).toFixed(1)//互锁解除
			this.sigUploopInputVoltage = Number(message.pscPower.upSafeInputVoltage).toFixed(1)//上行安全回路输入电压
			this.sigUploopOutputVoltage = Number(message.pscPower.upSafeOutVoltage).toFixed(1)//上行安全回路输出电压
			this.sigDownloopInputVoltage = Number(message.pscPower.downSafeInputVoltage).toFixed(1)//下行安全回路输入电压
			this.sigDownloopOutputVoltage = Number(message.pscPower.downSafeOutVoltage).toFixed(1)//下行安全回路输出电压
			
			this.ceshiValue = (message.upLink.sysPscCenterControlPanel.testOpAllowed == 1 || message.downLink
				.sysPscCenterControlPanel.testOpAllowed == 1);
		}
		
    }
}
</script>

<style scoped>
    .bg-top{
        height: 12.8vh;
		min-height: 124px;
        padding: 1.3vh 1.35vw 1.3vh 1.35vw;
        border-radius: 10px;
        background-color: #ffffff;
    }
    .system{
        display: flex;
    }
    .titleText{
        width: 1.1vw;
        font-size: 20px;
        font-weight: 700;
        color: #2A82E4;
    }
    .systemFailure{
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        padding: 1.1vh 0 1.1vh 0;
        margin-left: 2.6vw;
    }
    .systemFailure-list{
        display: flex;
        align-items: center;
        width: 15.6vw;
        height: 50%;
        margin-right: 1.56vw;
    }
    .systemFailure-list2{
        padding: 6px 0 6px 0;
        box-sizing: border-box;
        margin-right: 6px;
        height: 50%;
		display: flex;
		align-items: center;
    }
    .systemFailure-list2 span{
        font-size: 16px;
    }

    .dot{
        display: inline-block;
        width: 1vw;
        height: 1vw;
        margin-right: 0.52vw;
        border-radius: 50%;
        /* background-color: #09D891; */
		/* background-image:radial-gradient(#fff, #09D891,#09D891); */
		background-color: rgba(166, 166, 166, 1);
    }
	.dot0,.dot1{
		display: inline-block;
		width: 1vw;
		height: 1vw;
		min-width: 12px;
		min-height: 12px;
		margin-right: 0.52vw;
		border-radius: 50%;
		background-color: rgba(166, 166, 166, 1);
	}
	.dot1{
		 background-image: radial-gradient(#fff,rgba(212, 48, 48, 1),rgba(212, 48, 48, 1))!important;
	}
    .systemFailure-list span{
        font-size: 18px;
    }


    .bg-middle{
        /* height: 25.3vh; */
		/* min-height: 246px; */
        border-radius: 10px;
        background-color: #ffffff;
        /* margin-top: 1.8vh; */
        padding: 18px 26px;
    }
    .upstreamTitleText{
        font-size: 20px;
        color: #2A82E4;
        font-weight: 700;
    }
    .relayBox{
        display: flex;
        justify-content: space-around;
        width: 100%;
        height: 48%;
        margin-top: 43px;
    }
    .relay-list{
        height: 100px;
    }
    .relayListContent{
       /* width: 130px;
        height: 100px; */
        margin: 0 auto;
    }
    .relayListContent p{
        margin: 0;
        font-size: 14px;
        font-weight: 400;
        color: rgba(0, 0, 0, 1);
        text-align: center;
		margin-bottom: 0.5vh;
    }
    .relayListContent-Box1{
        width: 44px;
        height: 30px;
        line-height: 30px;
        color: #fff;
        border: 1px solid #000;
        border-bottom: hidden;
        margin: 0 auto;
        text-align: center;
    }
    .boxColor1{
        background-color: #43CF7C;
    }
    .boxColor2{
        background-color: #D43030;
    }
    .relayListContent-Box2{
        width: 44px;
        height: 47px;
        line-height: 47px;
        border: 1px solid #000;
        margin: 0 auto;
        text-align: center;
		padding: 0 10px;
    }

    .bg-bottom{
        /* height: 25.3vh; */
		/* min-height: 246px; */
        border-radius: 10px;
        background-color: #ffffff;
        margin-top: 2.1vh;
        padding: 18px 26px;
    }
	.relay-dis{
		display: flex;
		font-size: 14px;
		font-weight: 400;
		color: rgba(0, 0, 0, 1);
		width: 10.4vw;
		margin: 0 auto;
	}
	.relay-dis>>>.relayListContent-Box1{
		width: 6.9vw;
		height: 2.8vh;
		min-height: 28px;
		margin: auto;
		color: rgba(0, 0, 0, 1);
	}
	.relay-dis>>>.relayListContent-Box1:last-child{
		border-left: none;
	}
	.relayListContent-Box2{
		width: 10.4vw;
		font-size: 18px;
		font-weight: 700;
		color: rgba(0, 0, 0, 1);
	}
	.tipContent{
		position: fixed;
		top: 0px;
		height: 50px;
		line-height: 50px;
		z-index: 999999;
		width: 50%;
		margin-left: 20%;
		text-align: center;
	}
	.tipsTxt{
		color:red;
		font-weight: 600;
		font-size: 20px;
		width: 250px;
		margin: 0 auto;
	}
	.tipsTxt>>>.marquee-wrap,.tipsTxt>>>.scroll{
		height: 50px;
	}
	.tipsTxt>>>.marquee,.tipsTxt>>>.copy{
		margin-top: 0!important;
		margin-bottom: 0!important;
	}
	.tipsTxt>>>.getWidth{
		margin: 0!important;
	}
	.relayListContent-Box21{
		display: flex;
		justify-content: space-around;
	}
	/* 文字滚动 */
	.merquee {
		height: 50px;
		line-height: 50px;
		box-sizing: border-box;
		word-break: break-all;
		white-space: nowrap;
		overflow: hidden;
	}
	.merquee-txt {
		display: inline-block;
		padding-left: 100%;
		/* 从右至左开始滚动 */
		animation: marqueeTransform 16s linear infinite;
	}
	 
	@keyframes marqueeTransform {
		0% {
			transform: translate(0, 0);
		}
	 
		100% {
			transform: translate(-100%, 0);
		}
	}
	
	.bg2 {
		background-color: #fff;
		border-radius: 10px;
		padding: 2.1vh 1.5vw;
		margin-top: 10px;
		height: 38.1vh;
	}
	
	.bg4 {
		height: 5vh;
		padding: 0;
		line-height: 5vh;
		padding: 0 1.5vw;
	}
	.bg1 {
		background-color: #fff;
		border-radius: 10px;
		display: flex;
		align-items: center;
		/* height: 83.1vh; */
		/* height: 71vh; */
		padding: 2.1vh 1.5vw;
		margin-top: 10px;
	}
	@media screen  and (min-width: 1440px){
		.systemFailure-list2{
			margin-right: 10px;
		}
	}
	@media screen  and (min-width: 1280px){
		.systemFailure-list2{
			margin-right: 6px;
		}
	}
</style>